/**
 * @file light_gate.h
 * @author scj (443002340@qq.com)
 * @brief 光电门检测是否被遮挡的模块
 * @version 0.1
 * @date 2025-10-03
 * 
 * @copyright Copyright (c) 2025
 * 
 */
#ifndef LIGHT_GATE_H
#define LIGHT_GATE_H

#include "stm32f4xx_hal.h"
#include <stdbool.h>
#include "stdlib.h"
#include "memory.h"
#include "dji_motor.h"
typedef struct {
    uint16_t gpio_instance;  // GPIO实例
    GPIO_PinState now_state;     // 上一次读取的状态
    GPIO_PinState Init_state;     //初始读取状态
} LightGateInstance;
LightGateInstance *LightGateInit(uint16_t GPIO_Pin);
uint8_t LightGateUpdate(LightGateInstance *instance);
#endif
